#include "stdio.h"
#include <stdlib.h>
#include<time.h>
long long runS(long long int val){
    long long int  i=0;
    long long count=0;
    for (; i < val; i++ )
        count+=i;
    return count;

}
int main(int argc,char *argv[]){

    clock_t start,finish;
    double totaltime;
    long long int val = 1000000000;
    long long count=0;
    if(argc>1){
        val =atol(argv[1]);
    }else{
        printf("miss agr.\n");
        return 0;
    }
    start=clock();

    count =runS(val);

    finish=clock();
    totaltime=(double)(finish-start)/CLOCKS_PER_SEC;
    printf("end i:%lld count %lld time:%lf\n",val,count,totaltime);


}

